<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Gruppen</title>
    </head>
    <body>
        <div class="body">
            <h1>Meine Gruppen</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="list">
                <table>
                    <thead>
                        <tr>
                            <g:sortableColumn property="gruppenName" title="Name der Gruppe" />
                            <th>Position</th>
                            <th>Mitglieder</th>
                            <th></th>
                            <th></th>
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${gListe}" status="i" var="gruppeInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                            <td>${gruppeInstance.gruppenName}</td>
                            <td>${rListe.get(i)}</td>
                            <td>${aListe.get(i)}</td>
                            <td>Details</td>
                            <td>Gruppe verlassen</td>
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
            <h1>Neuer Gruppe beitreten</h1>
             <g:select optionKey="${{it.key.id}}" 
            		  from="${alleGruppen}" 
            		  name="alleGruppen.id" 
            		   >
             </g:select>
        </div>
    </body>
</html>
